Information Processing Device, Memory Management Method, and Recording Medium That Ensure Versatile Memory Management

ABSTRACT

An information processing device includes a memory and a control unit. The memory is employed as a program work area. The control unit switches between a first mode and a second mode; during the first mode, detects a resident program resident in the memory, and saves information identifying the resident program, as resident program information; and during the second mode, determines whether a requestor program, requesting allocation of the work area, is the resident program or not by comparing requestor-program identifying information with the resident program information, and in succession allocates in the memory respective work areas for one or more requestor programs determined to be resident programs.

INCORPORATION BY REFERENCE

This application is based upon, and claims the benefit of priority from,corresponding Japanese Patent Application No. 2014-065051 filed in theJapan Patent Office on Mar. 27, 2014, the entire contents of which isincorporated herein by reference.

BACKGROUND

Unless otherwise indicated herein, the description in this section isnot prior art to the claims in this application and is not admitted tobe prior art by inclusion in this section.

Conventionally, there has been a need for an efficient memory managementmethod. For example, for minimizing fragmentation of a free memory, aknown database processing unit classifies data to be stored in a memoryinto two types of actual processing data and a parameter required forthat process.

Additionally, the database processing unit arranges the one data from ahigh-level address and the other data from a low-level address so as toprevent these data from being mixed in the memory. Thus, separating amemory area for data, which have different properties (such as a timeperiod for being allocated) in the memory, reduces memory fragmentation.

SUMMARY

An information processing device according to one aspect of thedisclosure includes a memory and a control unit. The memory is employedas a program work area. The control unit switches between a first modeand a second mode; during the first mode, detects a resident programresident in the memory, and saves information identifying the residentprogram, as resident program information; and during the second mode,determines whether a requestor program, requesting allocation of thework area, is the resident program or not by comparing requestor-programidentifying information with the resident program information, and insuccession allocates in the memory respective work areas for one or morerequestor programs determined to be resident programs.

These as well as other aspects, advantages, and alternatives will becomeapparent to those of ordinary skill in the art by reading the followingdetailed description with reference where appropriate to theaccompanying drawings. Further, it should be understood that thedescription provided in this summary section and elsewhere in thisdocument is intended to illustrate the claimed subject matter by way ofexample and not by way of limitation.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a function block configuration of an informationprocessing device.

FIG. 2 illustrates a state where a work area is arranged in a RAM whilebroadly separated into a high-level address side and a low-level addressside with a classification based on belonging to a resident program (R1,R2, R3) and a non-resident program (N1, N2).

FIG. 3 illustrates a state where a work area R4 for a resident programis further allocated from the state of FIG. 2.

FIG. 4 illustrates a flowchart of processes in a detection mode of theresident program.

FIG. 5 illustrates a flowchart of processes in a normal mode.

DETAILED DESCRIPTION

Example apparatuses are described herein. Other example embodiments orfeatures may further be utilized, and other changes may be made, withoutdeparting from the spirit or scope of the subject matter presentedherein. In the following detailed description, reference is made to theaccompanying drawings, which form a part thereof.

The example embodiments described herein are not meant to be limiting.It will be readily understood that the aspects of the presentdisclosure, as generally described herein, and illustrated in thedrawings, can be arranged, substituted, combined, separated, anddesigned in a wide variety of different configurations, all of which areexplicitly contemplated herein.

Hereafter, a description will be given of the embodiments of thedisclosure with reference to the attached drawings.

Outline

First, an outline of the embodiment will be described. The embodimentassumes that an information processing device is mostly a typicalcomputer, especially a personal computer (PC).

The information processing device according to the embodiment classifiesa program to be executed in the information processing device into twotypes of a resident program and a non-resident program. Subsequently,for each type, the information processing device separates locations forallocating a work area requested by the program in the memory. Thus,memory fragmentation is reduced.

For the resident program, the work area allocated in the memory is usedfor extended periods of time from activation to termination of theinformation processing device. By contrast, for the non-residentprogram, the work area allocated in the memory is used only in a shorttime while the program is explicitly activated and to be terminated by auser.

That is, the resident program and the non-resident program differ intime taken of which the work area allocated in the memory is used in along time or in a short time. The embodiment focuses on this differenceto allocate the work areas in different areas in the memory for theresident program and the non-resident program. This ensures reducing thefragmentation due to the sandwiched work area to be released in a shorttime between the work areas used in a long time.

The embodiment assumes that the non-resident program releases the workarea allocated in the memory to be used when such as the users terminatethe program.

The information processing device of the embodiment firstly detects theresident program in a detection mode of the resident program (a firstmode) and creates a list of the resident programs (resident programinformation). Subsequently, after completing the detection mode of theresident program, the information processing device is changed to anormal mode (a second mode).

In the normal mode, the information processing device separates the workarea allocated in the memory by the resident program and the work areaallocated in the memory by the non-resident program in accordance withthe created list. Accordingly, while reducing the fragmentation of thework area in the memory, the information processing device executes thevarious programs. As a result, the information processing device ensuresa versatile memory management.

Shifting from the detection mode of the resident program to the normalmode may be performed by rebooting the information processing deviceafter changing a mode setting of the information processing device bythe explicit instruction from the user.

Up to this point, the outline of the embodiment has been described.

Resident Program

The resident program will now be described.

The resident program is the program being executed whenever theinformation processing device operates. The resident program isautomatically activated without the user explicitly instructing toactivate.

For example, any personal computer (PC) on which Windows (Registeredtrademark) operates as an Operating System (OS) display icons for someresident programs in a task tray displayed as a part of a Graphical UserInterface (GUI) of a display screen.

An example of the resident program includes antivirus software, amessenger for exchanging messages via a network, or similar software.

Up to this point, the resident program has been described.

Detection Method of Resident Program

Some examples related to the detection method of the resident programperformed by the information processing device of the embodiment willnow be described.

Method 1

Method 1 determines it from a fluctuation rate of a CPU load. Method 1activates and then leaves the information processing device as it iswithout the user's explicitly instructing to activate the program.Method 1 monitors the fluctuation rate of the CPU load of the programsrunning for a certain period. Method 1 determines that an operatingcondition of the information processing device has been stable if it hasbeen observed that the fluctuation rate for that period has kept apredetermined value or less. Consequently, method 1 determines that theprogram operating at that time is the resident program. Method 2

Method 2 determines from the CPU load. Method 2 activates and thenleaves the information processing device as it is without the user'sexplicitly instructing to activate the program. Method 2 monitors theCPU load of the programs running for a certain period. Method 2determines that an operating condition of the information processingdevice has been stable if it has been observed that the load for thatperiod has kept a predetermined value or less. Consequently, method 2determines that the program operating at that time is the residentprogram.

Method 3

Method 3 determines from settings of the OS of the informationprocessing device. Method 3 obtains a list of the programs being set soas to be automatically activated during activation of the informationprocessing device from an auto-start setting file of the OS.

Up to this point, some examples related to the detection method of theresident program performed by the information processing device of theembodiment have been described.

Configuration of Information Processing Device 10

A configuration of an information processing device 10 will now bedescribed. FIG. 1 illustrates the function block configuration of theinformation processing device 10.

As illustrated in FIG. 1, the information processing device 10 includesa Central Processing Unit (CPU) 11 (control unit), a Read Only Memory(ROM) 12, a Random Access Memory (RAM) 13 (memory), an operation inputunit 14, a network interface unit 15, a display unit 16, and a storageunit 17. These blocks are each connected via a bus 18. Unless otherwisenoted, the word “memory” mentioned in the description of the embodimentrefers to the RAM 13.

The ROM 12 permanently stores a plurality of programs such as a firmwareand data for performing the various processes. The RAM 13, which is usedas a working area of the CPU 11, temporarily holds the Operating System(OS), the various applications running on, and the various data duringprocessing.

The storage unit 17 is such as a Hard Disk Drive (HDD), a flash memory,or an additional non-volatile memory. The storage unit 17 storesresident program information 17 a, which will be described later, inaddition to the OS, the various applications, and the various data.

The network interface unit 15 is connected to the network for exchanginginformation with other systems, and mainly communicates the informationwith the other systems.

The CPU 11 loads the program, which corresponds to an instructionprovided by the operation input unit 14 among the plurality of programsstored in the ROM 12 and the storage unit 17, into the RAM 13.Subsequently, the CPU 11 appropriately controls the display unit 16 andthe storage unit 17 in accordance with this loaded program.

When the information processing device 10 is under the detection mode ofthe resident program, the CPU 11 detects the resident program. And then,the CPU 11 defines the detection result as an identifier list of theresident program to store in the storage unit 17 as the resident programinformation. The identifier as described in here refers to a programname, a program ID, or a similar item.

The operation input unit 14 is such as a pointing device including acomputer mouse, a keyboard, a touch panel, or an additional operatingdevice.

The display unit 16 is such as a liquid crystal display, anElectro-Luminescence (EL) display, a plasma display, a Cathode Ray Tube(CRT) display, or a similar display. The display unit 16 may becontained in the information processing device 10 or may be connectedexternally.

Up to this point, the configuration of the information processing device10 has been described. Separation Method of Work Area in RAM 13

A method for separating the work area, which is allocated in the RAM 13upon the program request of a work area allocation, for the residentprogram and the non-resident program will now be briefly described.

The work area as described in the embodiment refers to an area wheresuch as an instruction code required for executing the program and thedata required for the processes are loaded.

In the disclosure, the work area in the RAM 13 may be separated usingany suitable method. Meanwhile, in the embodiment, the separation methodof the work area with applying known techniques will be described.

FIG. 2 illustrates a state where the work area is arranged in the RAM 13while broadly separated into a high-level address side and a low-leveladdress side with the classification based on belonging to the residentprogram (R1, R2, R3) and the non-resident program (N1, N2).

In FIG. 2, the work areas R1, R2, and R3 for the resident program arearranged from the highest-level address (start point at one side) ofmemory addresses of the RAM 13. The work areas N1 and N2 for thenon-resident program are arranged from the lowest-level address (startpoint at opposite side) of the memory addresses.

Additionally, free spaces F1, F2, F3, F4, and F5, which are notallocated as the work area, are arranged. The positions of those freespaces are represented by chained free spaces RC1 and RC2, whichindicate a free space position in this order from the high-leveladdress, and chained free space NCI and NC2, which indicate the freespace position in this order from the low-level address.

The free space F3 is located between the work area allocated from thehigh-level address and the work area allocated from the low-leveladdress. The free space F3 is in the position that is denoted by thechained free spaces of both RC2 and NC2.

FIG. 3 illustrates a state where a work area R4 for the resident programis further allocated from the state of FIG. 2.

In FIG. 3, the work area R4 for the resident program is allocated in thehigh-level address side of the free space F3 as illustrated in FIG. 2.Then, instead of the chained free spaces RC2 and NC2 denoting the freespace F3, chained free spaces RC2′ and NC2′ denote a new free space F3′.

As described above, when separating the RAM 13 into two types to use,allocating the work area successively from both sides (the highest-leveladdress and the lowest-level address) of the address of the RAM 13ensures efficient use of the RAM 13 area.

However, it is not limited to the above, and separating the RAM 13 intothree or more types to use may also be applicable. The case ofseparating into three or more types includes such as the case where atime period of the work area to be used is separated into three or moretypes depending on a length of the time period instead of separatinginto two types for the resident program and the non-resident program.

Up to this point, the method for separating the work area, which isallocated in the RAM 13 upon the program request of the work areaallocation, for the resident program and the non-resident program hasbeen described.

Flow of Processes

A flow of the processes in the information processing device 10according to the embodiment will now be described. The detection mode ofthe resident program and the normal mode will be described separately.

First, the description for the flow of the processes in the detectionmode of the resident program will be provided. FIG. 4 illustrates theflowchart of the processes in the detection mode of the residentprogram.

First, the information processing device 10 is activated in thedetection mode of the resident program (Step S10). The activation may beperformed by the user's instruction, or automatically performed by suchas a timer.

Next, the CPU 11 performs a detection of the resident program after theinformation processing device 10 becomes in a stable state.Subsequently, the CPU 11 obtains all the detected identificationinformation of the resident program as the resident program information17 a (Step S11). The detection method of the resident program is asdescribed above.

Lastly, the CPU 11 saves the resident program information 17 a obtainedin the previous step into the storage unit 17 (Step S12).

Up to this point, the flow of the processes in the detection mode of theresident program has been described.

Next, the description for the flow of the processes in the normal modewill be provided. FIG. 5 illustrates the flowchart of the processes inthe normal mode.

First, the CPU 11 obtains the resident program information 17 a from thestorage unit 17 (Step S20).

Secondly, assume that a program requests the work area.

Subsequently, the CPU 11 determines whether the program of a requestorrequesting the work area is the resident program or not by comparing theresident program information 17 a with the requestor-program identifyinginformation (Step S21).

If the program of the requestor is the resident program (Yes at StepS21), the CPU 11 searches the free space (free memory) while tracing thechained free spaces RC1 and RC2 from the highest-level address of amemory space (Step S22).

If the program of the requestor is not the resident program (No at StepS21), the CPU 11 searches the free space (free memory) while tracing thechained free spaces NC1 and NC2 from the lowest-level address of thememory space (Step S23).

Lastly, the CPU 11 allocates the work area having the required size inthe free space obtained as search results (Step S24).

Up to this point, the flow of the processes in the normal mode has beendescribed.

The description for the flow of the processes in the informationprocessing device 10 according to the embodiment has been provided. Note

While various aspects and embodiments have been disclosed herein, otheraspects and embodiments will be apparent to those skilled in the art.The various aspects and embodiments disclosed herein are for purposes ofillustration and are not intended to be limiting, with the true scopeand spirit being indicated by the following claims.

What is claimed is:
 1. An information processing device, comprising: amemory employed as a program work area; and a control unit; wherein thecontrol unit switches between a first mode and a second mode, during thefirst mode, detects a resident program resident in the memory, and savesinformation identifying the resident program, as resident programinformation, and during the second mode, determines whether a requestorprogram, requesting allocation of the work area, is the resident programor not by comparing requestor-program identifying information with theresident program information, and in succession allocates in the memoryrespective work areas for one or more requestor programs determined tobe resident programs.
 2. The information processing device according toclaim 1, wherein the control unit further: starts the allocation of workareas for the resident programs with one of either a highest-leveladdress and a lowest-level address of the memory as a starting point;and starts the allocation of work areas for other than resident programswith, as a starting point, an opposite side of the memory from saidstarting point being one of either the highest-level address and thelowest-level address.
 3. The information processing device according toclaim 1, wherein the control unit further, in the first mode, after theinformation processing device has been activated, detects as theresident program a program that for a specified period has been runningin a state in which a control-unit load fluctuation rate is at or belowa predetermined value, without the program having been launched byexplicit instructions from a user.
 4. The information processing deviceaccording to claim 1, wherein the control unit further, in the firstmode, after the information processing device has been activated,detects as the resident program a program that for a specified periodhas been running in a state in which load on the control unit is at orbelow a predetermined value, without the program having been launched byexplicit instructions from a user.
 5. The information processing deviceaccording to claim 1, wherein the control unit further, in the firstmode, detects the resident program based on a set file for automaticallylaunching a resident program.
 6. A memory management method managing amemory employed as a program work area, the method comprising: switchingbetween a first mode and a second mode; during the first mode, detectinga resident program resident in the memory, and saving informationidentifying the resident program, as resident program information; andduring the second mode, determining whether a requestor program,requesting allocation of the work area, is the resident program or notby comparing requestor-program identifying information with the residentprogram information, and in succession allocating in the memoryrespective work areas for one or more requestor programs determined tobe resident programs.
 7. A non-transitory computer-readable recordingmedium storing an information processing program for controlling aninformation processing device managing a memory employed as a programwork area, the information processing program causing the informationprocessing device to: switch between a first mode and a second mode;during the first mode, detect a resident program resident in the memory,and save information identifying the resident program, as residentprogram information; and during the second mode, determine whether arequestor program, requesting allocation of the work area, is theresident program or not by comparing requestor-program identifyinginformation with the resident program information, and in successionallocate in the memory respective work areas for one or more requestorprograms determined to be resident programs.